/// File:		EngineInstance.h
/// Author:		Dennis Norton
/// Date:		07/16/12
/// Purpose:	This class contains the heart of the application. It stores
///				all the high level managers, updates, and renders.

#ifndef ENGINEINSTANCE_H_
#define ENGINEINSTANCE_H_

// Include your headers here...
#include "Utilities\Informant.h"
#include "Utilities\Timer.h"
#include "WindowClass.h"
#include "Components\MessageSystemComponent.h"
#include "Components\SettingsComponent.h"
/////////////////////////////////


// Forward Declare when possible...

//////////////////////////////////

class EngineInstance
{
	Timer _Timer; // The global timer for the application
	bool _IsRunning;
	bool _IsInitialized;
	WindowClass _AppWindow;
	MessageSystemComponent _Messenger;
	SettingsComponent _Settings;

public:
	EngineInstance() : _IsRunning(false), _IsInitialized(false), _Messenger(this), _Settings(){}
	~EngineInstance();

	/// Purpose:	Initializes all engine components
	bool Initialize(HINSTANCE instance);

	/// Purpose:	Updates the application, gets the elapsed time, and processes windows msgs
	bool HeartBeat();

	/// Purpose:	Shuts down the engine and uninitializes any major components that are running.
	///				Returns true on a successful shutdown.
	bool Shutdown();

	/// Purpose:	Handles messages processed by the system message component
	void HandleMessage(int Message);

	

	/// Purpose:	Returns true if the application is currently running and in focus.
	inline bool IsRunning() {return _IsRunning;}
	/// Purpose:	Returns a pointer to the settings component.
	inline SettingsComponent* GetSettingsCmp() {return &_Settings;}
};

#endif